<template>
  <div>
    <div class="row">
      <div class="left">
        <div class="left-black">
          <div class="userinfo">
            <img class="userPhoto" src="" alt="" />
            <div class="userName">姓名：{{ username }}</div>
            <div class="userSchool">学校：{{ school }}</div>
          </div>
        </div>
      </div>
      <div class="right">
        <div class="right-background">
          <div class="myClass">我的班级</div>
          <div class="list">
            <div class="list-1">
              <div class="list-title">积分榜</div>
              <ul class="overflow-y">
                <li v-for="(item, index) in list" :key="index">
                  <div class="num">{{ index + 1 }}</div>
                  {{ item }}
                </li>
              </ul>
            </div>
            <div class="list-2">
              <div class="list-title">书香榜</div>
              <ul class="overflow-y">
                <li v-for="(item, index) in list" :key="index">
                  <div class="num">{{ index + 1 }}</div>
                  {{ item }}
                </li>
              </ul>
            </div>
          </div>
        </div>
      </div>
    </div>
    <div class="popularBook">
      <div class="bookTitle">热门图书</div>
      <ul class="row3">
        <li class="p-book" v-for="(item2, index) in books" :key="index">
          <div class="imgbox">
            <img :src="item2.bookimg" alt="" />
          </div>

          <div class="bookbox">
            <div class="book-info">
              <div class="b-name">{{ item2.name }}</div>
              <div class="b-author">作者：{{ item2.author }}</div>
              <div class="b-cbs">出版社：{{ item2.cbs }}</div>
              <div class="b-time">发行时间：{{ item2.time }}</div>
            </div>
          </div>
        </li>
      </ul>
    </div>
    <div class="activity">
      <div class="bookTitle">局域竞赛</div>
      <ul class="row4">
        <li v-for="(item, index) in activity" :key="index">
          <div class="activity-box">
            <div class="sj">
              <div class="sj-num">{{ index + 1 }}</div>
            </div>
            <div class="place">{{ item.place }}</div>
            <div class="place-num">发布任务总数：{{ item.sum }}</div>
            <div class="ph-font">
              <div class="ph-ph">1、{{ item.ph1 }}</div>
              <div class="ph-ph">2、{{ item.pj2 }}</div>
              <div class="ph-ph">3、{{ item.ph3 }}</div>
            </div>
          </div>
        </li>
      </ul>
    </div>
    <div class="more">
      <a><img src="../assets/img/others/xia.png" alt="" /></a>
    </div>
    <div class="fixed"></div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      list: [
        "四年级 一班",
        "四年级 二班",
        "四年级 八班",
        "四年级 六班",
        "四年级 六班",
        "六年级 测试班级",
        "四年级 五班",
        "四年级 三班",
        "四年级 四班",
        "五年级 测试班级",
      ],
      books: [
        {
          bookimg: require("../assets/img/book/lbqdhlbb.png"),
          name: "了不起的狐狸爸爸",
          author: "(美国)罗德尔·达尔/著，代维/译",
          cbs: "明天出版社",
          time: "2009-03-01",
        },
        {
          bookimg: require("../assets/img/book/lyxz.png"),
          name: "绿野仙踪",
          author: "(美)弗兰克•鲍姆 著 陈伯吹 译",
          cbs: "长春出版社",
          time: "2009-07-01",
        },

        {
          bookimg: require("../assets/img/book/qadhsxs.png"),
          name: "亲爱的汉修先生",
          author: "贝芙莉·克莱瑞",
          cbs: "新蕾出版社",
          time: "2006-03-01",
        },
        {
          bookimg: require("../assets/img/book/xldw.png"),
          name: "夏洛的网",
          author: "E.B.怀特E.B.White",
          cbs: "上海译文出版社",
          time: "2004-05-01",
        },
        {
          bookimg: require("../assets/img/book/xzxlhl.png"),
          name: "小猪唏哩呼噜",
          author: "孙幼军 著，裘兆明 图",
          cbs: "春风文艺出版社",
          time: "2008-11-01",
        },
        {
          bookimg: require("../assets/img/book/lbxplj.png"),
          name: "鲁宾逊漂流记",
          author: "(英国)笛福/著，徐霞村/译",
          cbs: "人民文学出版社",
          time: "2008-06-01",
        },

        {
          bookimg: require("../assets/img/book/cfz.png"),
          name: "草房子",
          author: "曹文轩/ 著",
          cbs: "江苏少年儿童出版社",
          time: "2009-06-01",
        },
        {
          bookimg: require("../assets/img/book/atsth.png"),
          name: "安徒生童话",
          author: "(丹麦)安徒生 著，叶君健 译",
          cbs: "人民文学出版社",
          time: "1992-04-01",
        },
      ],
      activity: [
        {
          place: "广东",
          sum: "2775",
          ph1: "珠海",
          pj2: "东莞",
          ph3: "",
        },
        {
          place: "北京",
          sum: "27",
          ph1: "东城",
          pj2: "",
          ph3: "",
        },
        {
          place: "江苏",
          sum: "2",
          ph1: "苏州",
          pj2: "",
          ph3: "",
        },
        {
          place: "吉林",
          sum: "1",
          ph1: "通化",
          pj2: "",
          ph3: "",
        },
        {
          place: "福建",
          sum: "1",
          ph1: "厦门",
          pj2: "",
          ph3: "",
        },
        {
          place: "湖南",
          sum: "1",
          ph1: "益阳",
          pj2: "",
          ph3: "",
        },
        {
          place: "四川",
          sum: "1",
          ph1: "成都",
          pj2: "",
          ph3: "",
        },
        {
          place: "天津",
          sum: "0",
          ph1: "",
          pj2: "",
          ph3: "",
        },
      ],
      username: "1",
      school: "1",
    };
  },
  mounted() {
    // console.log("this.username  "+this.username);
    // console.log("this.shcool  "+this.school);

    (this.username = this.$route.query.username),
      (this.school = this.$route.query.school);
    console.log(this.username, this.school);
  },
};
</script>

<style  scoped>
@import "../assets/css/homePage";
</style>